home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
bin
/
search-path
< prev
next >
Wrap
Text File
|
2007-02-15
|
450b
|
25 lines
#!/bin/sh -e
# A cut-down version of 'which' from debianutils. Returns zero if executable
# $1 is found on $PATH.
PROGRAM="$1"
IFS=:
RET=1
case $PROGRAM in
*/*)
if [ -f "$ELEMENT/$PROGRAM" ] && \
[ -x "$ELEMENT/$PROGRAM" ]; then
exit 0
fi
;;
*)
for ELEMENT in $PATH; do
if [ -z "$ELEMENT" ]; then ELEMENT=.; fi
if [ -f "$ELEMENT/$PROGRAM" ] && \
[ -x "$ELEMENT/$PROGRAM" ]; then
exit 0
fi
done
;;
esac
exit 1